import argparse
from snownlp import SnowNLP

def sentiment_analysis(text):
    s = SnowNLP(text)
    sentiment_score = s.sentiments
    print(sentiment_score)
    return sentiment_score

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Sentiment Analysis using SnowNLP")
    parser.add_argument("text", type=str, help="Text to analyze sentiment")

    args = parser.parse_args()
    score = sentiment_analysis(args.text)
    print(score)
